﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ITax
    {
        [OperationContract]
        int Tax_Using(int TaxID);

        [OperationContract]
        DataSet Tax_GetAll();

        [OperationContract]
        DataSet Tax_GetValue(decimal Salary);

        [OperationContract]
        TaxInfo Tax_GetInfo(int TaxID);

        [OperationContract]
        DataSet Tax_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int Tax_Insert(TaxInfo eInfo);

        [OperationContract]
        bool Tax_Update(TaxInfo eInfo);

        [OperationContract]
        bool Tax_Delete(int TaxID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class TaxInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        decimal _Top;
        [DataMember]
        public decimal Top
        {
            get { return _Top; }
            set { _Top = value; }
        }

        decimal _Bottom;
        [DataMember]
        public decimal Bottom
        {
            get { return _Bottom; }
            set { _Bottom = value; }
        }

        decimal _Percent;
        [DataMember]
        public decimal Percent
        {
            get { return _Percent; }
            set { _Percent = value; }
        }

        decimal _Value;
        [DataMember]
        public decimal Value
        {
            get { return _Value; }
            set { _Value = value; }
        }
    }
}
